import request from "./request/request";

export function pubMomment(obj) {
  return request({
    url: "/create",
    method: "POST",
    data: {
      ...obj,
    },
  });
}

export function getMomment(obj) {
  return request({
    url: "/list",
    params: {
      ...obj,
    },
  });
}

export function getMommentTotal(obj) {
  return request({
    url: "/list/total",
    params: {
      ...obj,
    },
  });
}

export function setMommentLove(obj) {
  return request({
    url: "/like",
    params: {
      ...obj,
    },
  });
}

export function setMommentComment(obj) {
  return request({
    url: "/comment/add",
    method: "POST",
    data: {
      ...obj,
    },
  });
}

export function saveMommentPicture(obj) {
  return request({
    url: "/upload/update/img/owner",
    method: "POST",
    data: {
      ...obj,
    },
  });
}

export function getMommentComment(obj) {
  return request({
    url: "/comment/list",
    params: {
      ...obj,
    },
  });
}

export function setMommentCommentLike(obj) {
  return request({
    url: "/comment/like",
    params: {
      ...obj,
    },
  });
}

export function getMommentPopular() {
  return request({
    url: "/popular",
  });
}

export function getMommentDetail(obj) {
  return request({
    url: "/",
    params:{
      ...obj
    }
  });
}

export function getUserMommentRelated(obj) {
  return request({
    url: "/user/list",
    params:{
      ...obj
    }
  });
}